package com.ry.aop.myaop.advicechain;

/**
 * 异常通知
 */
public class ThrowAdvice extends BaseAdvice {

    @Override
    public Object execute(Chain chain) throws Throwable {

        try {
            return chain.proceed();
        } catch (Throwable tx){
            System.out.println("异常通知");
            throw tx;
        }
    }
}
